package com.lf.web.service.system.extension;

import com.lf.data.Cluster;
import com.lf.data.Page;
import com.lf.data.search.Field;
import com.lf.web.service.ServiceSupport;

public class ExtensionListService extends ServiceSupport {

    private ExtensionDAO extensionDAO;

    public ExtensionListService() {
    }

    public void setExtensionDAO(ExtensionDAO extensionDAO) {
        this.extensionDAO = extensionDAO;
    }

    public String execute() {
        Page page = this.getPage();
        Field field = new Field();
        field.include(Extension.NAME, Extension.LOCATION, Extension.TYPE, Extension.STATUS, Extension.VERSION, Extension.CREATED, Extension.INSTALLDATE);
        Cluster extensions = extensionDAO.findPage(null, field, null, page);
        context.put("extensions", extensions);
        return LIST;
    }
}
